﻿using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using MyMES.Domain.zyy;
using MyMES.Error;
using MyMES.Read.API.Application.Command.BOMguans;

namespace MyMES.Read.API.Controllers.ZYY.BOMguans
{
    [Route("api/[controller]/[action]")]
    [ApiController]
   
    public class BOMguanController : ControllerBase
    {
        /// <summary>
        /// BOM管理
        /// </summary>
        private readonly IMediator mediator;

        public BOMguanController(IMediator mediator)
        {
            this.mediator = mediator;
        }
        [HttpGet]
        public async Task<APIPaging<List<BOMguan>>> GetBOMguan([FromQuery] GetBOMguancommand request, CancellationToken cancellationToken)
        {
            return await  mediator.Send(request);
        }
    }
}
